import * as u from '@/util/util.js'

export const option = {
    border: true,
    index: true,
    indexLabel: '#',
    indexWidth: 70,
    stripe: true,
    align: 'center',
    searchMenuSpan: 6,
    labelWidth: 120,
    height: '450px',
    calcHeight: 400,
    dialogWidth: 900,
    menuWidth: 200,
    menuAlign: 'center',
    grid: true,
    viewBtnIcon: ' ',
    addBtnIcon: ' ',
    editBtnIcon: ' ',
    delBtnIcon: ' ',
    addBtn: u.buttonPermissionsCheck("JOB_INFO_ADD"),
    editBtn: u.buttonPermissionsCheck("JOB_INFO_UPDATE"),
    delBtn: u.buttonPermissionsCheck("JOB_INFO_DEL"),
    column: [
        {
            prop: 'id',
            label: 'ID',
            hide: true,
            addDisplay: false,
            editDisplay: false
        },
        {
            prop: 'jobGroup',
            label: '任务分组',
            type: 'input',
            overHidden: true,
            minWidth: 60,
            maxlength: 100,
            span: 24,
            search: true,
            rules: [{
                required: true,
                message: '请输入',
                trigger: 'blur'
            }]
        },
        {
            prop: 'jobName',
            label: '任务名称',
            type: 'input',
            overHidden: true,
            minWidth: 60,
            maxlength: 100,
            span: 24,
            search: true,
            rules: [{
                required: true,
                message: '请输入',
                trigger: 'blur'
            }]
        },
        {
            prop: 'cronExpression',
            label: 'Cron表达式',
            type: 'input',
            overHidden: true,
            minWidth: 60,
            maxlength: 100,
            span: 24,
            rules: [{
                required: true,
                message: '请输入',
                trigger: 'blur'
            }]
        },
        {
            prop: 'jobClass',
            label: '执行任务',
            type: 'input',
            overHidden: true,
            minWidth: 60,
            maxlength: 100,
            span: 24,
            rules: [{
                required: true,
                message: '请输入',
                trigger: 'blur'
            }]
        },
        {
            prop: 'jobParams',
            label: '任务参数',
            type: 'input',
            overHidden: true,
            minWidth: 60,
            maxlength: 100,
            span: 24,
        },
        {
            prop: 'description',
            label: '任务描述',
            type: 'textarea',
            overHidden: true,
            minWidth: 60,
            maxlength: 500,
            span: 24,
        },
        {
            prop: 'status',
            label: '任务状态',
            type: 'radio',
            overHidden: true,
            minWidth: 60,
            value:"PAUSED",
            span: 24,
            search: true,
            dicUrl: u.getUrlAll("/common/getItem/job_status")
        },
    ]
}

